home *** CD-ROM | disk | FTP | other *** search
- Path: news.byu.edu!news
- From: Nathan Nesbit <Nathan_Nesbit@byu.edu>
- Newsgroups: comp.lang.c++
- Subject: sizeof dymanic arrays
- Date: Wed, 21 Feb 1996 20:44:58 -0700
- Organization: Brigham Young University
- Message-ID: <312BE6BA.3725@byu.edu>
- NNTP-Posting-Host: cnr067.byu.edu
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0GoldB1 (Win95; I)
-
- Hello. I have a problem wit getting the sie of a dynamic array.
-
-
-
- This is in DOS real mode (large memory model)
-
- {
- char* temp;
-
- temp=new char[10];
-
- cout << sizeof temp;
- }
-
- I get 4 back for this. Which is the size of the pointer, not th=e array. Does anyone know how to get the number of elements in a
- dynamic array?
-
- Thanks much.
-